import {createStore} from 'vuex'
let token = localStorage.getItem('token')
export default createStore({
    state:{
        token:token?token:null,
        navList:[],
    },
    mutations:{
        setToken(state,token){
            state.token = token;
        },
        setNav(state,list){
          state.navList = list;
        }
    }
})